﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OOPA_opdracht.Model.Nodes
{
    public class NodeInputHigh : MainNode
    {
        public override String getKey()
        {
            return "INPUT_HIGH";
        }

        public override object Clone()
        {
            return new NodeInputHigh();
        }

        public override void show()
        {
            Console.WriteLine(getKey() + ": \t" + nodeName);
            Console.WriteLine("Input: \t" + output);
            Console.WriteLine();
        }

        public override void setOutput()
        {
            output = Inputs.INPUT_HIGH;
            show();
        }

        public override void setInput(Inputs input)
        {
            count();
        }

        private void count()
        {
            foreach (MainNode n in nextNodes)
                n.setInput(output);
        }
    }
}
